package edu.tgc.entity.system;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Embeddable
public class SysUserPosition implements Serializable {

    private static final long serialVersionUID = -667042132681773884L;
    protected SysPosition position;
    protected SysUser user;

    public SysUserPosition() {
    }

    public SysUserPosition(SysUser user, SysPosition position) {
        this.user = user;
        this.position = position;
    }

    @ManyToOne
    @JoinColumn(name = "position_id")
    public SysPosition getPosition() {
        return this.position;
    }

    @ManyToOne
    @JoinColumn(name = "user_id")
    public SysUser getUser() {
        return this.user;
    }

    public void setPosition(SysPosition position) {
        this.position = position;
    }

    public void setUser(SysUser user) {
        this.user = user;
    }

}
